<div class="user-columns">
  <div class="card">
    <div class="card-body">
      <% if columns.blank? %>
      <% if current_user && @user.id == current_user.id && current_user.column_editor? %>

      <div class="bs-dropzone">
        <p class="lead">你还没有创建属于你自己的专栏！</p>
        <hr>
        <p>
          <%= link_to ' 创建专栏', new_column_path, class: "fa fa-columns" %>
        </p>
      </div>
      <% else %>
      <div class="bs-dropzone">
        <p class="lead"> 未开通专栏！</p>
      </div>
      <% end %>
      <% else %>
      <% if current_user && @user.id == current_user.id && current_user.user_column_count_left > 0 %>
      <% if current_user.column_editor?  %>
      <div class="bs-dropzone">
        <p class="lead">你还可以创建 <%=current_user.user_column_count_left %> 个专栏！</p>
        <hr>
        <p>
          <%= link_to ' 创建专栏', new_column_path, class: "fa fa-columns" %>
        </p>
      </div>
      <% else %>
      <div class="bs-dropzone">
        <p class="lead"> 不能再创建专栏！</p>
      </div>
      <% end %>
      <% end %>
      <div class="row">
        <% columns.each do |column| %>
        <%=render 'column', column: column%>
        <% end %>
      </div>
      <% end %>
    </div>
  </div>
</div>
